package com.friend.joey.applicationfriend.Classes;

import android.provider.Settings;

import static android.R.attr.id;
import static com.baidu.location.h.j.S;
import static com.baidu.location.h.j.s;

/**
 * Created by Joey on 2017/4/25.
 */

public class RememRecord {
    public static final int SET_ALERT = 0;
    public static final int NOT_ALERT = 1;
    private int id;
    private String title;
    private String content;
    private String addtime;
    private String alerttime;
    private int alertId;
    private int type;
    private TimeDeal mtimeDeal;


    public RememRecord(String title,String content,int type){
        this.title=title;
        this.content=content;
        this.type=type;
        this.addtime=gettime();
        this.alerttime=new String();
        this.id=(int)System.currentTimeMillis();
    }
    public RememRecord(String title,String content,TimeDeal timeDeal,int alertId){
        this.title=title;
        this.content=content;
        this.type=SET_ALERT;
        this.addtime=gettime();
        this.mtimeDeal=timeDeal;
        this.alertId=alertId;
        this.alerttime=mtimeDeal.GetAlertTimeString();
        this.id=(int)System.currentTimeMillis();
    }
    public RememRecord(String title,String content,String addtime,int type){
        this.title=title;
        this.content=content;
        this.addtime=addtime;
        this.type=type;
    }
    public RememRecord(String title,String content,String addtime,int type,String alerttime,int alertId){
        this.title=title;
        this.content=content;
        this.addtime=addtime;
        this.type=type;
        this.alerttime=alerttime;
        this.alertId=alertId;
    }
    public RememRecord(int id,String title,String content,String addtime,int type){
        this.id=id;
        this.title=title;
        this.content=content;
        this.addtime=addtime;
        this.type=type;
    }
    public RememRecord(int id,String title,String content,String addtime,int type,String alerttime,int alertId){
        this.id=id;
        this.title=title;
        this.content=content;
        this.addtime=addtime;
        this.type=type;
        this.alerttime=alerttime;
        this.alertId=alertId;
    }

    private String gettime(){
        TimeDeal timedeal;
        timedeal = new TimeDeal(TimeDeal.INITDATE);
        String time=timedeal.GetAlertTimeString();
        return time;
    }

    public String getContent(){
        return content;
    }

    public int getId(){
        return id;
    }

    public int getType(){
        return type;
    }

    public String  getTitle(){
        return title;
    }
    public String getAddtime(){
        return addtime;
    }
    public String getAlerttime(){
        return alerttime;
    }
    public int getalertId(){
        return alertId;
    }

}
